{% extends 'base.html' %}
{% load staticfiles %}
{% block title %}个人信息-后台管理系统{% endblock %}
{% block custom_css %}
    <link rel="stylesheet" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
    <link rel="stylesheet" href="{% static 'js/plugins/queryCity/css/cityLayout.css' %}">
    <link rel="stylesheet" href="{% static 'css/lq.datetimepick.css' %}"/>
{% endblock %}

{% block headjs %}
    <script src="{% static 'js/jquery.min.js' %}"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}"></script>
{% endblock %}
    {% block custom_bread %}
        <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">个人中心</a>
      </span>
    {% endblock %}
{% block custom_content %}
    <div class="personal_list right ">
        <div class="personal_des ">
            <div class="head" style="border:1px solid #eaeaea;">
                <h1>个人信息</h1>
            </div>
            <div class="inforcon">
                <div class="left" style="width:240px;">
                    <iframe id='frameFile' name='frameFile' style='display: none;'></iframe>
                    <form class="clearfix" id="jsAvatarForm" enctype="multipart/form-data" autocomplete="off"
                          method="post"
                          action="{% url 'users:image_upload' %}" target='frameFile'>
                        <label class="changearea" for="avatarUp">
                            <span id="avatardiv" class="pic">
                                <img width="100" height="100" class="js-img-show" id="avatarShow"
                                     src="{{ MEDIA_URL }}{{ request.user.image }}"/>
                            </span>
                            <span class="fl upload-inp-box" style="margin-left:70px;">
                                <span class="button btn-green btn-w100" id="jsAvatarBtn">修改头像</span>
                                <input type="file" name="image" id="avatarUp" class="js-img-up"/>
                            </span>
                        </label>
                        {% csrf_token %}
                    </form>
                    <div style="border-top:1px solid #eaeaea;margin-top:30px;">
                        <a class="button btn-green btn-w100" id="jsUserResetPwd" style="margin:80px auto;width:100px;">修改密码</a>
                    </div>
                </div>
                <form class="perinform" id="jsEditUserForm" autocomplete="off">
                    <ul class="right">
                        <li>昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：
                            <input type="text" name="nick_name" id="nick_name" value="{{ request.user.nick_name }}"
                                   maxlength="10">
                            <i class="error-tips"></i>
                        </li>
                        <li>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日：
                            <input type="text" id="birth_day" name="birthday" value="{{ request.user.birthday }}"
                                   readonly="readonly"/>
                            <i class="error-tips"></i>
                        </li>
                        <li>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
                            <label><input type="radio" name="gender" value="male"
                                          {% ifequal request.user.gender 'male' %}checked{% endifequal %}>男</label>
                            <label><input type="radio" name="gender" value="female"
                                          {% ifequal request.user.gender 'female' %}checked{% endifequal %}>女</label>
                        </li>
                        <li class="p_infor_city">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：
                            <input type="text" name="address" id="address" placeholder="请输入你的地址"
                                   value="{{ request.user.address }}" maxlength="10">
                            <i class="error-tips"></i>
                        </li>
                        <li>手&nbsp;&nbsp;机&nbsp;&nbsp;号：
                            <input type="text" name="mobile" id="mobile" placeholder="请输入你的手机号码"
                                   value="{{ request.user.mobile|default_if_none:'' }}" maxlength="10">
                        </li>
                        <li>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：
                            <input class="borderno" type="text" name="email" readonly="readonly"
                                   value="{{ request.user.email }}"/>
                            <span class="green changeemai_btn">[修改]</span>
                        </li>
                        <li class="button heibtn">
                            <input type="button" id="jsEditUserBtn" value="保存">
                        </li>
                    </ul>
                    {% csrf_token %}
                </form>
            </div>
        </div>
    </div>
    <script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script src="{% static 'js/plugins/laydate/laydate.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}"></script>
<script src="{% static 'js/unslider.js' %}"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}"></script>
<script src="{% static 'js/validateDialog.js' %}"></script>
<script src="{% static 'js/deco-common.js' %}"></script>

<script src='{% static 'js/plugins/jquery.upload.js' %}' type='text/javascript'></script>
<script src="{% static 'js/validate.js' %}"></script>
<script src="{% static 'js/deco-user.js' %}" type='text/javascript'></script>
{% endblock %}
{% block custom_js %}

{% endblock %}
